import { Injectable } from '@nestjs/common';
import { JwtService } from '@nestjs/jwt';

@Injectable()
export class AuthService {
  constructor(private jwtService: JwtService) {}

  async generateString(userId: number): Promise<any> {
    const payload = { userId: userId };

    const access_token = await this.jwtService.signAsync(payload);

    // console.log(access_token);

    return access_token;
  }
}
